package com.wen.service;

import com.wen.pojo.Member;
import com.wen.pojo.Orders;
import com.wen.pojo.Product;
import com.wen.pojo.Traveller;

import java.util.List;

/**
 * @author 温嘉璐
 * 订单service
 */
public interface OrdersService {
    /**
     * 查询全部
     *
     * @param page
     * @param size
     * @return
     * @throws Exception
     */
    List<Orders> findAll(int page, int size) throws Exception;

    /**
     * 根据id查询
     *
     * @param id
     * @return
     * @throws Exception
     */
    Orders findById(int id) throws Exception;

    /**
     * 根据id删除
     *
     * @param id
     * @return
     * @throws Exception
     */
    int deleteById(int id) throws Exception;

    List<Product> findAllProduct() throws Exception;

    List<Member> findAllMember() throws Exception;

    int add(Orders orders) throws Exception;

    int addTraveller(Traveller traveller);

    int addOrderTraveller(int orderId, int travellerId);

    int findIdByOrderNum(String orderNum) throws Exception;
    void edit(Orders order);
}
